//
//  AL_CycleCollectionReusableView.m
//  22-homework-QQMV-ALi
//
//  Created by 王道林 on 16/8/14.
//  Copyright © 2016年 王道林. All rights reserved.
//

#import "AL_CycleCollectionReusableView.h"
#import "WDLCycleView.h"
#import "AL-DataModel.h"
#import "AL-ModelPic.h"


@interface AL_CycleCollectionReusableView ()
@property (nonatomic, strong) WDLCycleView *WdlCycle;

@end


@implementation AL_CycleCollectionReusableView


- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createSubView];
    }
    return self;
}


- (void)createSubView
{
    self.backgroundColor = [UIColor whiteColor];
    _WdlCycle = [[WDLCycleView alloc] initWithFrame:self.bounds];
    [self addSubview:_WdlCycle];
}



- (void)setDataModel:(AL_DataModel *)dataModel
{
    _dataModel = dataModel;
    NSMutableArray *arr = [NSMutableArray array];
    for (AL_ModelPic *pic in _dataModel.data) {
        [arr addObject:pic.picUrl];
    }
    _WdlCycle.arrayImage = arr;
    
}



@end
